package com.epfresh.views.dialog;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.util.Log;
import android.view.Display;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.epfresh.R;
import com.epfresh.activity.OfferListActivity;
import com.epfresh.api.utils.LocalDisplay;
import com.epfresh.guider.*;
public class OfferTipsDialog extends Dialog implements View.OnClickListener {
    private View root;
    private ViewGroup container;
    private Button rButton, lButton;

    private Context mContext;

    public OfferTipsDialog(Context context,int[] location) {
        super(context);
        mContext = context;
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        View v = LayoutInflater.from(getContext()).inflate(R.layout.dialog_offer_tips, null);
        v.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        setContentView(v);
        Window dialogWindow = getWindow();
        WindowManager.LayoutParams lp = dialogWindow.getAttributes();
        dialogWindow.setGravity(Gravity.TOP);
        lp.width = LocalDisplay.SCREEN_WIDTH_PIXELS;
        //lp.height = LocalDisplay.SCREEN_HEIGHT_PIXELS;
        lp.height = location[1]+ LocalDisplay.dp2px(52)-UiUtil.getStatusBarHeight(context);
        dialogWindow.setAttributes(lp);
    }

    @Override
    public void onClick(View v) {

    }
}